package com.dotflat.rest.service;

import com.dotflat.rest.PO.AreableObjectBasePO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.function.Consumer;

public interface AreableObjectBaseService<T> {

    T update(T t);

    T get(String areaId, String staffId, String id);

    Page<T> page(String areaId, String staffId, AreableObjectBasePO param, PageRequest pageRequest);

    void delete(String areaId, String staffId, AreableObjectBasePO param);

    void delete(String areaId, String staffId, String[] ids);

    boolean duplicateCheck(AreableObjectBasePO param);

    T add(String areaId, String staffd, AreableObjectBasePO param);

    T add(String areaId, String staffd, AreableObjectBasePO param, Consumer<? super T> preAction);

}
